/*
 * @Author: lvye
 * @Description:
 * @Date: 2023-06-28 10:23:19
 * @LastEditTime: 2023-08-14 10:24:22
 * @FilePath: \vue3-ts\src\main.ts
 */
import { createApp } from "vue"
import App from "./App.vue"
import router from "./router"
import store from "./store"
import globalRegister from "./global"
// import hyRequest from "@/service/index"
import { setupStore } from "@/store/index"
import "normalize.css"
import "./assets/css/index.less"
const app = createApp(App)
app.use(store)
app.use(globalRegister)
setupStore() //先初始化store 解决刷新页面404问题
app.use(router)
app.mount("#app")
// interface dataType {
//   data: any
//   returnCode: string
//   success: boolean
// }
// hyRequest
//   .get<dataType>({
//     url: "/ian",
//     // method: "GET",
//     // showLoading: false,
//     interceptors: {
//       requestInterceptors: (config) => {
//         console.log("接口请求成功的拦截")
//         return config
//       },
//       responseInterceptor: (res) => {
//         console.log("接口响应成功的拦截")
//         return res
//       }
//     }
//   })
//   .then((res) => {
//     console.log(res.data)
//     console.log(res.returnCode)
//     console.log(res.success)
//   })
